package com.gengral.bussiness.sys.user.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 *</p>
 *
 * @author sht
 * @date 2020-04-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(description = "")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户表主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户的八位编码，唯一标致")
    @TableField(value = "user_code")
    private String userCode;

    @ApiModelProperty("用户的姓名")
    @TableField(value = "user_name")
    private String userName;

    @ApiModelProperty("加密后的密码")
    @TableField(value = "user_pass")
    private String userPass;

    @ApiModelProperty("明文密码")
    @TableField(value = "pass_word")
    private String passWord;

    @ApiModelProperty("性别标记1男0女")
    @TableField(value = "user_sex")
    private Boolean userSex;

    @ApiModelProperty("用户的电话")
    @TableField(value = "phone_number")
    private String phoneNumber;

    @ApiModelProperty("用户的邮箱地址")
    @TableField(value = "email_address")
    private String emailAddress;

    @ApiModelProperty("是否有效标记，0无效1有效，默认1")
    @TableField(value = "del_flag")
    private Boolean delFlag;

    @ApiModelProperty("创建人的编码")
    @TableField(value = "gmt_create_by", fill = FieldFill.INSERT)
    private String gmtCreateBy;

    @ApiModelProperty("创建时间")
    @TableField(value = "gmt_create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime gmtCreateTime;

    @ApiModelProperty("最后更新人编码")
    @TableField(value = "gmt_modified_by", fill = FieldFill.UPDATE)
    private String gmtModifiedBy;

    @ApiModelProperty("最后更新时间")
    @TableField(value = "gmt_modified_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime gmtModifiedTime;


}